<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Define a text string</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.swf-definerect.html">swf_definerect</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.swf-endbutton.html">swf_endbutton</a></div>
 <div class="up"><a href="ref.swf.html">SWF 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.swf-definetext" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">swf_definetext</h1>
  <p class="verinfo">(PHP 4)</p><p class="refpurpose"><span class="refname">swf_definetext</span> &mdash; <span class="dc-title">Define a text string</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.swf-definetext-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>swf_definetext</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$objid</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$str</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$docenter</code></span>
   )</div>

  <p class="para rdfs-comment">
   Defines a text string using the current font and font size.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.swf-definetext-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">objid</code></em></dt>

     <dd>

      <p class="para">
       The object id.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">str</code></em></dt>

     <dd>

      <p class="para">
       The text, as a string.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">docenter</code></em></dt>

     <dd>

      <p class="para">
       The <em><code class="parameter">docenter</code></em> is where the word is centered, if
       <em><code class="parameter">docenter</code></em> is 1, then the word is centered in x.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.swf-definetext-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.swf-definetext-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-3483">
    <p><strong>Example #1 Horizontal text example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$Xposition&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">50</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$Yposition&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">50</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$Zposition&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$Obj_depth&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$char&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'THIS&nbsp;IS&nbsp;THE&nbsp;TEXT'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">swf_pushmatrix</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">swf_definefont&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">swf_nextid</span><span style="color: #007700">(),&nbsp;</span><span style="color: #DD0000">"Mod"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">swf_fontsize</span><span style="color: #007700">(</span><span style="color: #0000BB">10</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$secondid&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">swf_nextid</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">swf_definetext</span><span style="color: #007700">(</span><span style="color: #0000BB">$secondid</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$char</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">swf_translate</span><span style="color: #007700">(</span><span style="color: #0000BB">$Xposition</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$Yposition</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Zposition</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">swf_placeobject</span><span style="color: #007700">(</span><span style="color: #0000BB">$secondid</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$Obj_depth</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">swf_popmatrix</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.swf-definetext-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.swf-definefont.html" class="function" rel="rdfs-seeAlso">swf_definefont()</a> - Defines a font</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.swf-definerect.html">swf_definerect</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.swf-endbutton.html">swf_endbutton</a></div>
 <div class="up"><a href="ref.swf.html">SWF 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
